package com.stt.experiment.zjx.gate.server.buffer;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import io.netty.channel.Channel;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString(callSuper = true)
public class GateRequestBuffer extends AbstractRequestBuffer{

    private static final long serialVersionUID = 1239780231789387933L;

    // 过滤不需要序列化的字段
    @JSONField(serialize = false)
    private Channel channel; // 请求连接管道
    private Long userId; // 用户id

    public GateRequestBuffer(Channel channel, JSONObject data) {
        this.channel = channel;
        this.module = data.getString("module");
        this.cmd = data.getString("cmd");
        this.data = data.getJSONObject("data");
    }


}
